<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>在线客服</title>
    <link href="../static/css/Style.css" rel="stylesheet" type="text/css">
</head>
<script language="javascript" type="text/javascript" src="../static/js/json2.js"></script>
<script language="javascript" type="text/javascript" src="../static/js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="../static/js/js.js"></script>
<script language="javascript" type="text/javascript" src="../static/js/sendmsg.js"></script>
<script language="javascript" type="text/javascript">
var g_cardId = parseInt("{{.cardflag}}",10);
var g_peer_sid ="{{.peer_sid}}";
var g_sid = "{{.sid}}";
var g_ctype="{{.ctype}}";
var g_send_url ="{{.send_url}}";
var g_get_url ="{{.get_url}}";
setTimeout(function () { 
	RefreshMsg( g_get_url,g_sid );	
}, 2000);	
$(function()
{
	if(g_ctype == 1){
		 $(document).attr("title", "与"+$('#strCCDesc').val()+"对话" );
	}
	winLoad(g_cardId);	
	window.onbeforeunload=function(){
		if(document.all){
			if(event.clientY<0){
				exitMsg(g_send_url, g_sid, g_peer_sid  );
			}
		}else{
			exitMsg(g_send_url, g_sid, g_peer_sid  );
		}
	}			

});
</script>
<body >
    <form name="form1" id="form1">
        <div>
			<input type="hidden" name="strSID" id="strSID" value="{{.sid}}" />
            <input type="hidden" name="peer_id" id="peer_id" value="{{.peer_sid}}" />
            <input type="hidden" name="strCCDesc" id="strCCDesc" value="{{.nickname}}" />
            <input type="hidden" name="strBusinessCard" id="strBusinessCard" value="{{.card}}" />
        </div>
        <table align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td rowspan="2">
                    <table width="430" align="center" cellpadding="0" cellspacing="0" bgcolor="#EDF0F7"
                        style="font-size: 12px; border-right: #c6d7de 1px solid; border-top: #c6d7de 1px solid;
                        border-left: #c6d7de 1px solid; border-bottom: #c6d7de 1px solid;">
                        <tr>
                            <td width="394" height="28" background="../static/images/webFree_titbg.jpg">
                                <div id="Status">
                                </div>
                            </td>
                            <td width="34" align="center" background="../static/images/webFree_titbg.jpg">
                                <img src="../static/images/bp_dian.gif" /></td>
                        </tr>
                        <tr>
                            <td height="30px" colspan="2" align="center" valign="middle">
                                <div style="width:600px;height:15px;line-height:15px;font-size:12px;text-align:left;vertical-align:middle;margin-left:10px;">
                                    <a href="#" onClick="displayCard(1)" title="隐藏名片"><img src="../static/images/3.jpg" alt="隐藏名片" style="cursor: hand;vertical-align:middle;"/> 隐藏名片</a>
                                    <a href="#" onClick="displayCard(0)" title="显示名片"><img src="../static/images/2.jpg" alt="显示名片" style="cursor: hand;vertical-align:middle;"/> 显示名片</a><a href="#" onClick="getScreen( {{.ctype}},{{.peer_sid}},{{.sid}} )" title="截屏"><img src="../static/images/1.gif" style="cursor: hand;vertical-align:middle;" alt="截屏" /> 截屏</a>
                                    <a href="{{.down_plug_url}}" target="_blank" id="down_plug_url" ><img  src="../static/images/down.gif" alt="获取截图插件" border="0"  style="cursor: hand;vertical-align:middle;" /> 下载插件</a>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td height="255" colspan="2" align="center" valign="top">
                                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="font-size: 12px;
                                    line-height: 20px">
                                    <tr>
                                        <td align="left">
                                            <!--表情层开始-->
                                            <div id="EmoList_div" style="border-right: #4a7253 thin solid; border-top: #4a7253 thin solid;
                                                display: none; z-index: 10000; border-left: #4a7253 thin solid; border-bottom: #4a7253 thin solid;
                                                position: absolute; background-color: white; width: 240px" onmouseout ="DisplayEmo(1)" onmouseover = "DisplayEmo(0)">
                                                <table cellspacing="0" cellpadding="0" border="0" >
                                                    <tr>
                                                        <td>
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/smile.gif" alt="微笑:)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/openmouthed.gif" alt="大笑:D">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/winking.gif" alt="眨眼;)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/angry.gif" alt="生气:@">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/shy.gif" alt="害羞:$">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/crying.gif" alt="哭:'(">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/daze.gif" alt="发呆:|">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/sweat.gif" alt="汗:!">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/sick.gif" alt="呕吐:S">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/swoon.gif" alt="晕:*">                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/surprised.gif" alt="吃惊:-o">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/titter.gif" alt="偷笑:->">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/mouthed.gif" alt="闭嘴:-#">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/sleeping.gif" alt="困了|-)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/sicken.gif" alt="生病+o(">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/thinking.gif" alt="思考*-)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/tumble.gif" alt="我倒8*/">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/cool.gif" alt="耍酷8-)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/clap.gif" alt="鼓掌:<>">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/envious.gif" alt="眼馋8-P">                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/knock.gif" alt="敲打(N)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/sad.gif" alt="难过(S)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/doubt.gif" alt="疑问(?)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/88.gif" alt="再见(8)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/hiss.gif" alt="嘘(O~)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/search.gif" alt="查找(Z)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/rose.gif" alt="玫瑰(F)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/wither.gif" alt="枯萎的玫瑰(W)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/heartbroken.gif" alt="心跳(L)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/heartbeat.gif" alt="心碎(U)">                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/victory.gif" alt="胜利(V)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/ok.gif" alt="ok(O)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/good.gif" alt="真棒(Y)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/modest.gif" alt="真逊(T)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/shake.gif" alt="握手(HS)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/dining.gif" alt="吃饭(D)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/phone.gif" alt="电话(E)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/sun.gif" alt="太阳(#)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/rain.gif" alt="下雨(R)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/goodnight.gif" alt="晚安(I)">                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/coffee.gif" alt="咖啡(C)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/beer.gif" alt="啤酒(B)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/football.gif" alt="足球(SO)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/music.gif" alt="音乐(%)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/money.gif" alt="金钱($)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/cake.gif" alt="蛋糕(@)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/gift.gif" alt="礼物(G)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/watch.gif" alt="表(+)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/home.gif" alt="家(H)">
                                                            <img onClick="selectEmo(this.src)" src="../static/images/moticons/fruitjuice.gif" alt="果汁(~)">                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <!--表情层结束-->
											<!-----取得消息层----->
											<div id="Getdisp_Div"  align="left" style="font-size:12px; height:70px; display:none; border-top: #336699 1px solid; padding-left: 5px;">
											</div>
											<!---取得消息层结束-->
											<div style="border-right: #c6d7de 1px solid; border-top: #c6d7de 1px solid;
													border-left: #c6d7de 1px solid; border-bottom: #c6d7de 1px solid; background-color: #ffffff;">
									           <!--消息列表层开始-->
												<div>
												<iframe id="GetMsg" frameborder="0" marginwidth="0" marginheight="0" src="../static/getmsg.htm" width="98%" height="250"></iframe>
												</div>
												<!--消息列表层结束-->
												<!--发送文件层开始-->
												<div id="File_Div"  align="left" style="font-size:12px; height:70px; display:none; border-top: #336699 1px solid; padding-left: 5px;" width="98%">
												<div>
												  <iframe scrolling="no" frameborder="0"  height="35px" marginwidth="0" width="98%" src="../static/file.htm?type={{.ctype}}&peer_sid={{.peer_sid}}&sid={{.sid}}"></iframe></div>
                                                  <div>
												  说明：文件类型:gif,jpg,zip,rar,doc,xls,txt,限20兆<input  type="button" value="关闭" onClick="DisplayFile(1)" /></div>
												<div>
											   </div>
											   <!--发送文件层结束-->
											   
										  </div>  
										</td>
                                    </tr>																
                                    <tr>
                                        <td height="25" valign="middle">
                                            <table width="418" height="100%" border="0" cellpadding="0" cellspacing="0" style="font-size:12px">
                                                <tr>
                                                    <td width="81"  align="center" valign="middle">
                                                        <a href="#" onClick="DisplayEmo(0)" title="发送表情"><img src="../static/images/emo.gif" alt="发送表情" align="absmiddle" /> 发送表情</a></td>
                                                    <td width="85"  align="center" valign="middle">
                                                        <a href="#" onClick="DisplayFont()" title="设置字体"><img src="../static/images/font.gif" alt="设置字体" align="absmiddle" /> 设置字体 </a></td>
                                                    <td width="85"  align="center" valign="middle">
                                                        <a href="#" onClick="DisplayFile(0)" title="发送文件"><img src="../static/images/file.gif" alt="发送文件" align="absmiddle" style="cursor: hand" /> 发送文件 </a></td>
                                                    <td width="89"  align="center" valign="middle">
                                                        <a href="#" onClick="btnSave()" title="保存消息"><img src="../static/images/save.gif" alt="保存消息" align="absmiddle" style="cursor: hand" /> 保存消息 </a></td>
                                                    <td width="89" align="center" valign="middle" id="btn_addcustomer">       <a href="#" onClick="btnAddCustomer(g_send_url,g_sid, g_peer_sid )" title="增加客户"><img src="../static/images/edit_add.png" alt="增加客户" align="absmiddle" style="cursor: hand" />增加客户</a>
                                                    </td>
                                                </tr>
                                      </table>                                        </td>
                                    </tr>
                                    <tr>
                                        <td height="64" align="center">
                                            <table width="98%" height="88" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"
                                                style="border-right: #c6d7de 1px solid; border-top: #c6d7de 1px solid; border-left: #c6d7de 1px solid;
                                                border-bottom: #c6d7de 1px solid">
                                                <tr>
                                                    <td width="346" height="86" align="left">
                                                        
														<iframe id ="txtSendMsg"  name = "txtSendMsg" frameborder="0" marginWidth="0" marginHeight="0" style="height:80px; width:100%; padding-right: 5px;padding-left: 5px;"></iframe>                                                    </td>
                                                    <td width="57" align="center">
                                                        <img id="ibtnMsg" src="../static/images/btnSendMsg.jpg" alt="Ctrl+回车键发送" align="middle"
                                                            style="cursor: hand;" onClick="btnSendMsg(g_send_url,g_peer_sid,g_sid)" />                                                    </td>
							<td width="16" align="left">
							 <div id = "ShortcutKeyDiv" style=" font-size:12px;position: absolute; z-index:1000; width:150px; height:40px;background:#FFFFFF; display:none; border:#0066FF 1px solid;" onmouseout ="SetShortcutKey(1)" onmouseover = "SetShortcutKey(0)">										    
			                                   <input type="radio" name="RadioGroup1" value="Enter" onClick="SetShortcutKey(1)">按回车键发送信息
							   <br/>
							   <input type="radio" name="RadioGroup1" value="Enter+" checked="checked" onClick="SetShortcutKey(1)">按Ctrl+回车键发送信息									
							 </div>
                                                         <img src="../static/images/rechage.gif" align="middle" alt="单击设置快捷键" onClick="SetShortcutKey(0)" style="cursor:hand;" >
													
						        </td>
                                                  </tr>
                                               </table>  
                                        </td>
                                    </tr>
                                    
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
                <td height="333" width="13px" valign="top">
                    <br />
                    <img id="Cardimg" src="../static/images/yincang.gif" width="13" height="44" onClick="displayCard(1)">
                </td>
                <td rowspan="2">
                    <!--名片层开始-->
                    <div id="Card">
                        <table width="220" height="423" align="center" cellpadding="0" cellspacing="0" bgcolor="#EDF0F7"
                            style="font-size: 12px; border-right: #c6d7de 1px solid; border-top: #c6d7de 1px solid;
                            border-left: #c6d7de 1px solid; border-bottom: #c6d7de 1px solid;">
                            <tr>
                                <td width="220" height="407" align="center" valign="top">
                                    <table width="92%" height="384" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td height="30" style="font-size: 12px; width: 201px;">
                                                我的名片</td>
                                        </tr>
                                        <tr>
                                            <td height="207" valign="top" bgcolor="#FFFFFF" style="font-size: 12px; border-right: #c6d7de 1px solid;
                                                border-top: #c6d7de 1px solid; border-left: #c6d7de 1px solid; border-bottom: #c6d7de 1px solid;
                                                width: 201px; padding-right: 5px; padding-left: 5px;">
                                                <div style="height: 20px">
                                                </div>
                                                <div id="CardName" style="font-size: 18px; font-family: 华文行楷; text-align: center;">
                                                </div>
                                                <hr style="border-right: #b7dde0 thick solid; border-top: #b7dde0 thick solid; border-left: #b7dde0 thick solid;
                                                    border-bottom: #b7dde0 thick solid" />
                                                <div id="CardContent" style="line-height: 25px">
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                              </td>
                          </tr>
                        </table>
                  </div>
                    <!--名片层结束-->
                </td>
            </tr>
        </table>
        <!--字体设置层开始-->
        <div id="Font_Div" style="display: none;">
            <div class="winFrame" style="left: 100px; top: 40px;">
                <div class="winTitle" onMouseDown="beginDrag(this.parentNode,event);">
                    <table width="100%">
                        <tr>
                            <td style="font-size: 13px">
                                字体设置</td>
                            <td align="right">
                                <img src="../static/images/close.gif" alt="关闭" style="cursor: hand;" onClick="javascript:Font_Div.style.display = 'none'"></td>
                        </tr>
                    </table>
                </div>
                <div class="winContent">
                    <div>
                        <table width="350" border="0" align="center" cellpadding="0" cellspacing="0" style="font-size: 13px">
                            <tr>
                                <td>
                                    字体(<font style="text-decoration: underline;">F</font>)</td>
                                <td>
                                    字形(<font style="text-decoration: underline;">Y</font>)</td>
                                <td>
                                    大小(<font style="text-decoration: underline;">S</font>)</td>
                                <td align="center">&nbsp;
                                    
                                </td>
                            </tr>
                            <tr>
                                <td width="146" rowspan="3">
                                    <input type="text" id="txtFontFamily" style="width: 130px; height: 20px" 
                                        readonly>
                                    <select id="ddFontFamily" size="7" class="Select" style="width: 130px;" onChange="FontFamily(this[this.selectedIndex].value)">
                                        <option value="宋体">宋体</option>
                                        <option value="华文彩云">华文彩云</option>
                                        <option value="华文新魏">华文新魏</option>
                                        <option value="华文细黑">华文细黑</option>
                                        <option value="华文行楷">华文行楷</option>
                                        <option value="幼圆">幼圆</option>
                                        <option value="方正姚体">方正姚体</option>
                                        <option value="方正舒体">方正舒体</option>
                                        <option value="楷体_GB2312">楷体_GB2312</option>
                                        <option value="隶书">隶书</option>
                                        <option value="黑体">黑体</option>
                                        <option value="Arial">Arial</option>
                                        <option value="MS Mincho">MS Mincho</option>
                                        <option value="PMingLiU">PMingLiU</option>
                                        <option value="Tahoma">Tahoma</option>
                                        <option value="Verdana">Verdana</option>
                                    </select>
                                </td>
                                <td width="77" rowspan="3">
                                    <input type="text" id="txtFontStyle" style="width: 60px; height: 20px" 
                                        readonly>
                                    <select id="ddFontStyle" size="7" class="Select" style="width: 60px;" onChange="FontStyle(this[this.selectedIndex].value)">
                                        <option value="常规">常规</option>
                                        <option value="粗体">粗体</option>
                                        <option value="斜体">斜体</option>
                                        <option value="粗斜体">粗斜体</option>
                                    </select>
                                </td>
                                <td width="62" rowspan="3">
                                    <input type="text" id="txtFontSize" style="width: 50px; height: 20px" value="12"
                                        readonly>
                                    <select id="ddFontSize" class="Select" size="7" style="width: 50px;" onChange="FontSize(this[this.selectedIndex].value)">
                                        <option value="8">8</option>
                                        <option value="10">10</option>
                                        <option value="12">12</option>
                                        <option value="14">14</option>
                                        <option value="18">18</option>
                                        <option value="24">24</option>
                                        <option value="36">36</option>
                                    </select>
                                </td>
                                <td width="65" align="center" valign="top">
                                    <div>
                                        <input type="button" id="btnConfirm" value=" 确定 " style="font-size: 12px" onClick="Confirm()" />
                                    </div>
                                    <div>
                                        <input type="button" id="btnCancel" value=" 取消 " style="font-size: 12px" onClick="Cancel()" />
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div>
                        <table width="349" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="149" height="85" valign="middle">
                                    <fieldset style="height: 70px">
                                        <legend>效果</legend>
                                        <input type="checkbox" id="chkThrough" onClick="textDecoration()" />
                                        <font style="font-size: 12px">删除线</font>
                                        <br>
                                        <input type="checkbox" id="chkUnderline" onClick="textDecoration()" />
                                        <font style="font-size: 12px">下划线</font>
                                    </fieldset>
                                </td>
                                <td width="20">
                                </td>
                                <td width="180" height="85" colspan="6" valign="middle">
                                    <fieldset style="width: 180px; height: 70px">
                                        <legend>在线即时服务</legend><font id="lbShow" style="font-size: 12px; word-break: break-all;">
                                            北京社文科技有限公司</font>
                                    </fieldset>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <!--字体设置层结束-->	
		
    </form>
</body>
</html>
